home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
STRINGS
/
PACKAGE6
/
INTVALUE.DOC
< prev
next >
Wrap
Text File
|
1990-07-25
|
1KB
|
35 lines
-----------------------------------------------------------------------------
IntegerValue
-----------------------------------------------------------------------------
declaration: function IntegerValue ( AString:
TypeString):
integer;
purpose: To convert a string into an integer equivalent
precondition: AString is filled with numbers only
postcondition: IntegerValue is a positive/negative integer
IntegerValue is set to zero if there are any
characters in AString
special cases: none
example: var
AString:
TypeString;
begin
.
.
.
ReadLnString (AString, LastKey);
writeln (output, IntegerValue (AString));
.
.
.
end
--------------------------------------------------------------------------------